using System.Collections.Generic;

namespace ColorBox4Sitecore.RessourcesRegistation
{
    public class RessourceComparer : IEqualityComparer<Ressource>
    {
        #region Implementation of IEqualityComparer<in Ressource>

        public bool Equals(Ressource x, Ressource y)
        {
            return x.Path.ToLower() == y.Path.ToLower()
                   && y.Type == x.Type;
        }

        public int GetHashCode(Ressource obj)
        {
            return obj.Type.GetHashCode();
        }

        #endregion
    }
}